package com.study.testSpringBoot.enumUtil;

public enum ServiceEnum {

	admin(1,"com.study.testSpringBoot.service.impl.AdminUserServiceImpl"), 
	common(2,"com.study.testSpringBoot.service.impl.ComonUserServiceImpl");
	
	private Integer mark;
	
	private String path;

	private ServiceEnum(Integer mark, String path) {
		this.mark = mark;
		this.path = path;
	}

	public Integer getMark() {
		return mark;
	}

	public void setMark(Integer mark) {
		this.mark = mark;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	
	/**
	 * 根据标记获取全类名
	 * @param mark
	 * @return
	 */
	public static String getPathByMark(Integer mark) {
		for(ServiceEnum se : ServiceEnum.values()) {
			if(se.getMark() == mark)
				return se.getPath();
		}
		return null;
	}
}
